﻿using LaserTag.Module.Vision.Controllers;
using LaserTag.Module.Vision.ViewModels;
using LaserTag.Module.Vision.Views;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Unity;

namespace LaserTag.Module.Vision
{
    public class VisionModule : IModule
    {
        private readonly IUnityContainer m_container;

        public VisionModule(IUnityContainer container)
        {
            m_container = container;
        }

        #region IModule Members

        public void Initialize()
        {
            //m_container.RegisterInstance<ISettingClass>(new SettingClass(){ Setting="Guaa"});

            //var x = m_container.Resolve<ClassA>();


            m_container.RegisterType<IVisionSetupView, VisionSetupView>();
            m_container.RegisterType<IVisionSetupViewModel, VisionSetupViewModel>();
            var controller = m_container.Resolve<VisionSetupController>();
            controller.Run();
        }

        #endregion
    }


    public interface ISettingClass
    {
        string Setting { get; set; }
    }

    public class SettingClass : ISettingClass
    {
        public string Setting
        {
            get; set;
        }
    }

    public class SettingClassB : ISettingClass
    {
        public string Setting
        {
           get
           {
               return "GEEE";
           }
            set
            {
                return;
            }
        }
    }

    public class ClassA
    {
        public ClassA(ClassB classb)
        {
            
        }
    }

    public class ClassB
    {
        public ClassB(ClassC classc)
        {
            
        }
    }

    public class ClassC
    {
        public ClassC(ISettingClass settings)
        {
            
        }
    }

}
